<#assign base=request.contextPath />
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>日志列表-日志管理-系统管理-<@spring.message "label.title.key"/></title>
	<meta name="keywords" content="<@spring.message "label.keywords.key"/>" />
	<meta name="description" content="<@spring.message "label.description.key"/>" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	
	<#include "/commons/headImport.ftl">
</head>

<body>
	<#include "/commons/navbar.ftl">
	
	<div class="main-container" id="main-container">
		<script type="text/javascript">
			try{ace.settings.check('main-container' , 'fixed')}catch(e){}
		</script>

		<div class="main-container-inner">
			<#include "/commons/leftsider.ftl">

			<div class="main-content">
				<div class="breadcrumbs" id="breadcrumbs">
					<script type="text/javascript">
						try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
					</script>

					<ul class="breadcrumb">
						<li>
							<i class="icon-home home-icon"></i>
							<a href="#">系统管理</a>
						</li>
						<li>
							<a href="${base}/dept/list">日志管理</a>
						</li>
						<li class="active">日志列表</li>
					</ul><!-- .breadcrumb -->

					<div class="nav-search" id="nav-search">
						<form class="form-search">
							<span class="input-icon">
								<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
								<i class="icon-search nav-search-icon"></i>
							</span>
						</form>
					</div><!-- #nav-search -->
				</div>
				
				<form class="form-horizontal" role="form" name="accessLogsFormName">
					<div class="page-content">
					<div class="page-header">
						<h1>查询条件</h1>
					</div>
					<div class="space-4"></div>

					<div class="row">
						<div class="col-xs-12">
							<div class="form-group">
								<label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 请求名称 </label>
								<div class="col-sm-4">
									<input type="text" name="qurl" value="${accessLogsDO.qurl!''}" class="col-xs-10 col-sm-10" />
								</div>
								<div class="col-sm-4orm-group center">
									<button class="btn btn-sm btn-success" type="button" id="search_dept_id">查询
									<i class="icon-search icon-on-right bigger-110"></i>
								</button>
								<button class="btn btn-sm" type="reset" id="reset_dept_id">
									<i class="icon-undo bigger-110"></i>重置
								</button>
								</div>
							</div>
							<div class="space-4"></div>
						</div>
						
						<div class="col-xs-12">
							<div class="table-responsive">
							<table id="sample-table-1" class="table table-striped table-bordered table-hover">
							<thead>
								<tr>
									<th>ID</th>
									<th>访问地址</th>
									<th class="hidden-480">访问人</th>
									<th class="hidden-480">来源地址</th>
									<th>
										<i class="icon-time bigger-110 hidden-480"></i>请求开始时间
									</th>
									<th class="hidden-480">
										<i class="icon-time bigger-110 hidden-480"></i>请求完成时间								
									</th>
								</tr>
							</thead>
							<tbody>
							<#if pr??>
								<#list pr.data as accessLogs>									
								<tr>
									<td>${accessLogs.id}</td>
									<td>${accessLogs.url}</td>
									<td>${accessLogs.createdBy}</td>
									<td>${accessLogs.ip}</td>
									<td>${accessLogs.gmtStart?string('yyyy-MM-dd HH:mm:ss')}</td>
									<td>${accessLogs.gmtEnd?string('yyyy-MM-dd HH:mm:ss')}</td>
								</tr>
								</#list>
							</#if>
							<#if ((pr.data)?size==0)>
								<tr>
									<td colspan="7" class="center">没有查询任何数据</td>
								</tr>
							</#if>
							</tbody>
						</table>

					<#import "commons/pager.ftl" as p/>
					<@p.p pageParam=pr toURL="${base}/accessLogs/list" formName="accessLogsFormName"/>
					</div><!-- /.table-responsive -->
				</div><!-- /span -->
			</div><!-- /row -->
		</div><!-- /.page-content -->
	</form>
	</div><!-- /.main-content -->
	
	<#include "/commons/tag.ftl">
	
</div><!-- /.main-container-inner -->
	
<!-- up -->
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
	<i class="icon-double-angle-up icon-only bigger-110"></i>
</a>
<form name="bankFromName" method="get">
</form>
</div><!-- /.main-container -->

<#include "/commons/footJs.ftl">
<!-- inline scripts related to this page -->
<script type="text/javascript">
	jQuery(function($) {
		$('table th input:checkbox').on('click' , function(){
			var that = this;
			$(this).closest('table').find('tr > td:first-child input:checkbox')
			.each(function(){
				this.checked = that.checked;
				$(this).closest('tr').toggleClass('selected');
			});
		});
	
		$('[data-rel="tooltip"]').tooltip({placement: tooltip_placement});
		function tooltip_placement(context, source) {
			var $source = $(source);
			var $parent = $source.closest('table')
			var off1 = $parent.offset();
			var w1 = $parent.width();
	
			var off2 = $source.offset();
			var w2 = $source.width();
	
			if( parseInt(off2.left) < parseInt(off1.left) + parseInt(w1 / 2) ) return 'right';
			return 'left';
		}
		
		$("#search_dept_id").click(function(){
			var form = document.accessLogsFormName;
			form.action="${base}/accessLogs/list";
			form.submit();
		});
		$("#reset_dept_id").click(function(){
			var form = document.accessLogsFromName;
			form.action="${base}/accessLogs/list";
			form.submit();			
		});
	})
</script>
</body>
</html>
